<script setup lang="ts">
import SafeTopContainer from '@/components/SafeTopContainer/SafeTopContainer.vue'

onShow(() => {
//   预览文件
  handlePreviewFile()
})

function handlePreviewFile() {
  uni.downloadFile({
    url: 'http://qn.zblack.cn/%E6%B1%BD%E9%85%8D%E5%A4%96%E8%B4%B8-20241125.docx',
    success(res) {
      console.log(res)
      const filePath = res.tempFilePath
      uni.openDocument({
        filePath,
        showMenu: true,
        success(res) {
          console.log(res)
        },
      })
    },
    fail(res) {
      console.log(res)
    },
  })
}
</script>

<template>
  <safe-top-container :padding-bottom="5">
    <wd-navbar title="订单" custom-class="!bg-transparent" :bordered="false" left-arrow @click-left="navigateBack" />
  </safe-top-container>
  <div class="contract-container bg-gray-100">
    12
  </div>
</template>

<style scoped>
.contract-container {
  min-height: calc(100vh - 80px);
}
</style>
